#region Copyright
/* Product of DTL Software
 * Product Name : Support Memmory
 * Author : dinhtienlam.spkt@gmail.com
 * About: Developer of DTL Software
 * Contact : 0966 330 237
 */
#endregion

#region Using default
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms.Design; 
#endregion

namespace Lamdt.Controls
{
    public class LamdtGroupBoxControlDesigner : ParentControlDesigner
    {
        public override void Initialize(System.ComponentModel.IComponent component)
        {
            base.Initialize(component);

            if (this.Control is LamdtGroupBox)
            {
                this.EnableDesignMode(((LamdtGroupBox)this.Control).WorkingArea, "WorkingArea");
                this.EnableDesignMode(((LamdtGroupBox)this.Control).TotalPanel, "TotalPanel");
            }

            if (this.Control is LamdtGroupBoxFill)
            {
                this.EnableDesignMode(((LamdtGroupBoxFill)this.Control).WorkingArea, "WorkingArea");
            }
        }

        public override bool CanParent(System.Windows.Forms.Control control)
        {
            return control is System.Windows.Forms.Control;
        }

        public override bool CanParent(System.Windows.Forms.Design.ControlDesigner controlDesigner)
        {
            if (controlDesigner != null && controlDesigner.Control is System.Windows.Forms.Control)
            {
                return true;
            }
            return false;
        }

    }
}
